﻿@using QDT.Common
@using QDT.Core.Domain.Enums
@model IList<QDT.Web.Admin.Models.ArticleCateTree>
<div class="main_title">文章分类列表</div>
<div class="blank5"></div>
<div class="button_row">
    @Html.ActionLink("新增","Add","ArticleCate",null,new{@class="button"})
    @Html.ActionLink("删除","Delete","ArticleCate",null,new{@class="button"})
</div>
<div class="blank5"></div>
<!-- Think 系统列表组件开始 -->
<div class="grid_box">
 <div class="grid_top"></div>
  @Html.Grid(Model).Columns(column => {
            column.CheckBox(o => o.Id);
            column.For(x => x.Id).Named("编号").SortColumnName("ID");
            column.For(x => new MvcHtmlString(x.Title)).Named("分类名称").SortColumnName("Title");
            column.For(x => ((ArticleType)x.TypeId).ToLocalizable()).Named("文章类型").SortColumnName("InnerTypeId");
            column.For(x => x.IsEffect ? "有效" : "失效").Named("状态").SortColumnName("IsEffect");
            column.For(x => x.Sort).Named("排序").SortColumnName("Sort");
            column.Buttons(btns => btns.Add(x =>Html.ActionLink("编辑","Edit",new{id=x.Id}))
                                       .Add(o =>Html.ScriptLink("删除", "del({0})".FormatWith(o.Id))));
        }).Complex(ViewData)

<!-- Think 系统列表组件结束 -->
 

<div class="blank5"></div>
</div>